<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    
    <title>秒速侠</title>
    <meta name="description" content="秒速侠">
    <link href="../css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link href="../css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link href="../css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
    <link href="../css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
    <link href="../ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.1.0}" rel="stylesheet"/>
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="shortcut icon" href="../favicon.ico" th:href="@{favicon.ico}"/>
    <style type="text/css">label.error { position:inherit;  }</style>

    <script type="text/javascript" src="angular.min.js">  </script>
    <script src="https://cdn.bootcss.com/axios/0.19.0/axios.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
    <script src="../js/service/userService.js"></script>
    <script type="text/javascript" src="../js/controller/identityController.js">  </script>
    <script>
        if(window.top!==window.self){window.top.location=window.location};
        var app = angular.module('app',[]);
        app.controller('appcontroller',function($scope,$http){
            $scope.list={};
            $scope.token=localStorage.getItem("token");


            // $scope.findAll=function(){
            //     $http.get('http://localhost:8082/usershow/findById').function(res){
            //
            //     }
            // }




            //token获取信息
            $scope.findAll = function(){
                $http({
                    method: 'get',
                    data: {},
                    url: 'http://localhost:8082/usershow/findById',
                    headers: {//这里设置
                        'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
                        'Accept':'*/*',
                        "tou":localStorage.getItem("token")
                    }
                }).success(function(d) {
                   console.log(d);
                   alert(d.msg);
                   if (20000==d.code) {
                       $scope.list=d.data;
                   }

                }).error(function(d) {
                    console.log(d);
                    alert(d.msg);
                });
            }

            //通信录认证
            $scope.identityaddressbook = function(){
                var  mess = confirm("请求访问手机信息");
                if (mess){
                    $http({
                        method: 'POST',
                        data: {},
                        url: 'http://localhost:8082/certificate/identity/addressbook/id',
                        headers: {//这里设置
                            'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
                            'Accept':'*/*',
                            "tou":localStorage.getItem("token")
                        }
                    }).success(function(res) {
                        console.log(res);
                        alert(res.msg);
                        location.reload();
                    }).error(function(d) {
                        console.log(d);
                        alert(d.msg);
                    });


                    // $http.post('http://localhost:8082/certificate/identity/addressbook/id'?tou='+localStorage.getItem("token")).success(function (res) {
                    //  alert(res.msg);
                    //  location.reload();
                    // });
                }else {
                    alert("通信录验证失败!");
                }
            }

            //认证按钮
            $scope.gigback=function () {
                if ($scope.list.userAuthentication!='1') {
                    alert("请优先认证身份证！！！");
                }else {
                    window.location.href='bind_card.html'
                }
            }
        })
    </script>
</head>
	
	
	
<body class="signin" ng-app="app" ng-controller="appcontroller" ng-init="findAll()">

    <div class="signinpanel">
        <div class="row">
            <div class="col-sm-7">
                <div class="signin-info">
                    <div class="logopanel m-b">
                        <h1><img alt="[ 若依 ]" src="../ruoyi.png" th:src="@{/ruoyi.png}"></h1>
                    </div>
                    <div class="m-b"></div>
                    <h4> <strong>秒速侠</strong></h4>
                   
                   
                </div>
            </div>
            <div class="col-sm-5">
                <form>
                    <h4 class="no-margins">身份认证状态：</h4>

                    <table  style="color:black" width="270" height="300">
                        <tr>

                            <td>身份认证</td>
                            <td ng-if="list.userAuthentication=='1' "><a onclick="" style="color:green">认证成功</a></td>
                            <td ng-if="list.userAuthentication!='1' "><a onclick="window.location.href='identity_page.html'" style="color:red" >未认证</a></td>
                        </tr>

                        <tr>
                            <td>绑卡</td>
                            <td ng-if="list.cardAuthentication=='1' "><a onclick="" style="color:green">认证成功</a></td>
                            <td ng-if="list.cardAuthentication!='1'"><a ng-click="gigback()" style="color:red" >未认证</a></td>
                        </tr>
                        <tr>
                            <td>联系人</td>
                            <td ng-if="list.linkmanAuthentication=='1' "><a onclick="" style="color:green">认证成功</a></td>
                            <td ng-if="list.linkmanAuthentication!='1' "><a onclick="window.location.href='contact.html'"  style="color:red">未认证</a></td>
                        </tr>
                        <tr>
                            <td>通讯录</td>
                            <td ng-if="list.addressbookAuthentication=='1' "><a onclick="" style="color:green">认证成功</a></td>
                            <td ng-if="list.addressbookAuthentication!='1' "><a ng-click="identityaddressbook()" style="color:red">未认证</a></td>
                        </tr>
                        <tr>
                            <td>运营商认证</td>
                            <td ng-if="list.operatorAuthentication=='1' "><a onclick="" style="color:green">认证成功</a></td>
                            <td ng-if="list.operatorAuthentication!='1' "><a onclick="window.location.href='mobile_page.html'"  style="color:red">未认证</a></td>
                        </tr>
                        <tr>
                            <td>淘宝认证</td>
                            <td ng-if="list.taobaoAuthentication=='1' "><a onclick="" style="color:green">认证成功</a></td>
                            <td  ng-if="list.taobaoAuthentication!='1' "><a onclick="window.location.href='alipay_page.html'"  style="color:red">未认证</a></td>
                        </tr>
                    </table>
					<a href="javascript:void(0);" onclick="window.location.href='user_center.html'" >我的个人中心&raquo;</a>
					 
            </div>
					<div>
					
					
                </form>
            </div>
        </div>
        <div class="signup-footer">
            <div class="pull-left">
               
            </div>
        </div>
    </div>
    
<script th:inline="javascript"> var ctx = [[@{/}]]; var captchaType = [[${captchaType}]]; </script>
<!-- 全局js -->
<script src="../js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
<script src="../js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
<!-- 验证插件 -->
<script src="../ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
<script src="../ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
<script src="../ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script src="../ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="../ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.1.0}"></script>
<script src="../ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
</body>
</html>
